import java.io.BufferedReader;
import java.io.InputStreamReader;


public class KillCmd {
	
	public static void main(String[] args) throws Exception {
		Runtime runtime = Runtime.getRuntime();  
		         Process process = runtime.exec("cmd /c " + "tskill javaw");  
		         BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream(), "UTF-8"));  
		         String line = null;  
		         StringBuilder build = new StringBuilder();  
		         while ((line = br.readLine()) != null) {  
		             build.append(line);  
		         }  
		         System.out.println(build);
	}

}
